package com.example.demo.datasource;

public class DynamicHolder {
    private static final ThreadLocal<String> dataSourceHolder = new ThreadLocal<>();

    public static void setDataSource(String dataSourceKey) {
        dataSourceHolder.set(dataSourceKey);
    }

    public static String getDataSourceHolder() {
        return dataSourceHolder.get();
    }

    public static void clearDataSource() {
        dataSourceHolder.remove();
    }
}
